<?php 

$js_array = array('announcement.js');
$vars = 'var user_type = "'._session('user_type').'"';
get_backend_header($js_array, array(), $vars);

?>

<h2 class="title"> View Announcement</h2>

<form id="cms_form" name="cms_form" class="form">
    <input type="hidden" id="announcement_id" name="announcement_id" value="<?php echo $announcement_id; ?>" />

    <div class="unit">

        <div class="line">
                <label for="" class="">Title:</label>
                <div class="field bold" style="height:auto">
                    <?php echo $title ?>
                </div>
        </div>

        <div class="line">
                <label for="" class="">Description:</label>
                <div class="field" style="height:auto; width:auto;">
                    <?php echo $description;?>
                </div>
        </div>

       <div class="line">
            <label class="unit" for="file" >File Attachment: </label>
            <div class="unit field " style ="width:auto">
                <?php if (! empty($file_name) ) { ?>
                    Download file : <a target ="_blank" href ="<?php echo site_url('announcement/download_file/'.$announcement_id) ?>" ><?php echo substr($file_name, 0, 20) ?></a>
                <?php } ?>
            </div>
        </div>


    </div>


    <div class ="clear"></div>

    <div class="buttons">

            <a href="<?php echo site_url('announcement/list_records'); ?>" id="cancel" name="cancel">Back</a>
    </div>

</form>

<script type="text/javascript">
	$('#cancel').button({
		icons: {primary: 'ui-icon-arrowreturn-1-w'}
	});
</script>

<?php
get_backend_footer();
